package com.demo.config;

import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Author by admin, Email xx@xx.com, Date on 2020/6/5.
 * PS: Not easy to write code, please indicate.
 */
//@Configuration
//public class Routes {
//    @Bean
//    public RouteLocator customRouteLocator(RouteLocatorBuilder routeLocatorBuilder){
//        RouteLocatorBuilder.Builder routes = routeLocatorBuilder.routes();
//        routes.route("path_route_redirect",
//                r->r.path("/baidu").uri("http://www.baidu.com/"));
//        return routes.build();
//    }
//}
